Skip to content

Output formatting#84

Merged
hmgaudecker merged 60 commits intomainfrom
output-formatting
Mar 18, 2026
Merged

Output formatting#84
hmgaudecker merged 60 commits intomainfrom
output-formatting

Conversation

@hmgaudecker
Copy link
Member

@hmgaudecker hmgaudecker commented Feb 15, 2026

  • Add diagnostic_plots module for model diagnostics
  • Add variance_decomposition module for decomposing measurement variance
  • Improve visualize_transition_equations; allow passing states directly to get_transition_plots
  • Increase test coverage to close to 100% (new tests for 13 modules)
  • Bump to dags 0.5.1, pandas 3.0 compatibility; stricter ruff rules

hmgaudecker and others added 30 commits January 8, 2026 18:53
Introduce strongly-typed dataclasses for model configuration:
- Dimensions, Labels, Anchoring, EstimationOptions, TransitionInfo
- FactorEndogenousInfo, EndogenousFactorsInfo

This improves type safety and enables IDE autocompletion while keeping
user-facing model_dict as a plain dictionary.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace dict fields with frozendict in frozen dataclasses to ensure
true immutability:
- Labels.aug_periods_to_periods
- Labels.aug_stages_to_stages
- Anchoring.outcomes
- TransitionInfo.param_names, individual_functions, function_names
- EndogenousFactorsInfo.aug_periods_to_aug_period_meas_types, factor_info

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update process_model() to return a ProcessedModel frozen dataclass
and update all consumers to use attribute access instead of dict access.

This provides:
- Better type safety with explicit typed fields
- Immutability via frozen dataclass
- IDE autocomplete support
- Clear documentation of the model structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…c so that config.TEST_DATA_DIR is valid also for skillmodels the package (as opposed to the project).
The filtered_states DataFrame and params index both use aug_period as the
period identifier, not period. This fixes KeyError when calling
decompose_measurement_variance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Base automatically changed from strong-typing to main March 9, 2026 07:15
@hmgaudecker hmgaudecker marked this pull request as ready for review March 15, 2026 15:46
hmgaudecker and others added 6 commits March 16, 2026 12:34
The viz code assumed states DataFrames always have `aug_period` as a
column, but pre-computed states (e.g. from health-cognition) may carry
`period` in the index instead. Add `_normalize_states_columns` to
promote index levels and rename `period` → `aug_period` when needed.

Also document the period vs aug_period convention in CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hmgaudecker hmgaudecker merged commit e965395 into main Mar 18, 2026
9 of 10 checks passed
@hmgaudecker hmgaudecker deleted the output-formatting branch March 18, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant